<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>mechanoChemIGA: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">mechanoChemIGA
   &#160;<span id="projectnumber">0.2.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="codestructure.html"><span>Code&#160;structure</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li><a href="modules.html"><span>Functions</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="https://github.com/mechanoChem/mechanoChem"><span>GitHub&#160;code&#160;repo</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">mechanoChemIGA Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Developed by the Computational Physics Group at the University of Michigan. <a href="http://www.umich.edu/~compphys/index.html">http://www.umich.edu/~compphys/index.html</a> <br/>
</p>
<p><b>List of contributors:</b> <br/>
 Greg Teichert (Lead Developer) <br/>
 Shiva Rudraraju <br/>
 Koki Sagiyama <br/>
 Krishna Garikipati <br/>
</p>
<p><b><a href="https://htmlpreview.github.io/?https://raw.githubusercontent.com/mechanoChem/mechanoChem/master/doxygen/html/index.html">Code documentation</a></b><br/>
</p>
<h1><b>Overview</b> <br/>
 </h1>
<p>The mechanoChemIGA code is an isogeometric analysis based code used to solve the partial differential equations describing solid mechanics (including gradient elasticity) and chemistry (including the Cahn-Hilliard phase field model). It is built on the PetIGA [<a href="https://bitbucket.org/dalcinl/petiga/">https://bitbucket.org/dalcinl/petiga/</a>] and PETSc [<a href="https://www.mcs.anl.gov/petsc/">https://www.mcs.anl.gov/petsc/</a>] libraries, and it uses the automatic differentiation capabilities of the Sacado package from the Trilinos library [<a href="https://trilinos.github.io/">https://trilinos.github.io/</a>]. <br/>
</p>
<h1><b>Version information</b> </h1>
<p>This is version 0.2.2. <br/>
</p>
<h1><b>License</b> </h1>
<p>GNU Lesser General Public License (LGPL). Please see the file LICENSE for details. Note that the functions IGAElementNextFormFunction and IGAComputeProjectionFunction in the file src/output.cc, as well as all functions in the file src/petigasnes_mod.h were derived from the PetIGA/src/petigasnes.c source code in the PetIGA library [<a href="https://bitbucket.org/dalcinl/petiga/">https://bitbucket.org/dalcinl/petiga/</a>]. Accordingly, we include the license/copyright notice for the PetIGA library here in the file LICENSE_PetIGA to apply to the above functions.<br/>
</p>
<h1><b>Acknowledgements</b> </h1>
<p>This code has been developed under the support of the following: <br/>
</p>
<p>Toyota Research Institute, Award #849910 "Computational framework for data-driven, predictive, multi-scale and multi-physics modeling of battery materials" <br/>
 NSF DMREF grant: DMR1436154 "DMREF: Integrated Computational Framework for Designing Dynamically Controlled Alloy-Oxide Heterostructures" <br/>
 NSF CDI Type I grant: CHE1027729 "Meta-Codes for Computational Kinetics" <br/>
 DOE BES, Division of Materials Sciences and Engineering: Award DE-SC0008637 that funds the PRedictive Integrated Structural Materials Science (PRISMS) Center at University of Michigan <br/>
</p>
<h1><b>Referencing this code</b> </h1>
<p>If you write a paper using results obtained with the help of this code, please consider citing one or more of the following: <br/>
</p>
<p>"A variational treatment of material configurations with application to interface motion and microstructural evolution" (Journal of the Mechanics and Physics of Solids) <br/>
 G. Teichert, S. Rudraraju, K. Garikipati <br/>
</p>
<pre>
@article{Teichert2016a,
    title   = "A variational treatment of material configurations with application to interface motion and microstructural evolution ",
    journal = "Journal of the Mechanics and Physics of Solids ",
    volume  = "99",
    pages   = "338 - 356",
    year    = "2017",
    issn    = "0022-5096",
    doi     = "https://doi.org/10.1016/j.jmps.2016.11.008",
    url     = "http://www.sciencedirect.com/science/article/pii/S0022509616305221",
    author  = "Gregory H. Teichert and Shiva Rudraraju and Krishna Garikipati",
}
</pre><p>"A comparison of Redlich-Kister polynomial and cubic spline representations of the chemical potential in phase field computations" (Computational Materials Science) <br/>
 G. Teichert, H. Gunda, S. Rudraraju, A. Natarajan, B. Puchala, K. Garikipati, A. Van der Ven <br/>
</p>
<pre>
@article{Teichert2016b,
    title   = "A comparison of Redlich-Kister polynomial and cubic spline representations of the chemical potential in phase field computations ",
    journal = "Computational Materials Science ",
    volume  = "128",
    pages   = "127 - 139",
    year    = "2017",
    issn    = "0927-0256",
    doi     = "https://doi.org/10.1016/j.commatsci.2016.11.024",
    url     = "http://www.sciencedirect.com/science/article/pii/S0927025616305754",
    author  = "Gregory H. Teichert and N.S. Harsha Gunda and Shiva Rudraraju and Anirudh Raju Natarajan and Brian Puchala and Krishna Garikipati and Anton Van der Ven",
}
</pre><p>"Mechano-chemical spinodal decomposition: A phenomenological theory of phase transformations in multi-component, crystalline solids" (Nature npj Computational Materials) <br/>
 S. Rudraraju, A. Van der Ven, K. Garikipati <br/>
</p>
<pre>
@article{Rudraraju2016,
  Title                    = {Phenomenological treatment of chemo-mechanical spinodal decomposition},
  Author                   = {S. Rudraraju and A. Van der Ven and K. Garikipati},
  Journal                  = {npj Computational Materials},
  Year                     = {2016},
  Volume                   = {2},
  Doi                      = {10.1038/npjcompumats.2016.12}
}
</pre><h1><b>Installation</b> </h1>
<p>A Dockerfile is included that creates a Docker image with all necessary libraries in an Ubuntu environment. Alternative installation instructions are as follows:</p>
<p>1) Install PETSc: <br/>
</p>
<p>-Download and extract PETSc source code. <br/>
 -Quick installation as follows (the symbol $ denotes the command prompt): <br/>
 </p>
<pre class="fragment">$ ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich  --download-metis --download-parmetis --download-superlu_dist
$ make all test
</pre><p>-Set the appropriate PETSC_DIR and PETSC_ARCH environment variables, e.g. <br/>
 </p>
<pre class="fragment">$ export PETSC_DIR=/path/to/petsc-3.8.3
$ export PETSC_ARch=arch-linux2-c-debug
</pre><p>Note that this also installs mpich. It is possible to use an existing version of mpi by including a flag to its directory. If you will be using the local PETSc installation of mpich, set the following: </p>
<pre class="fragment">$ alias mpirun=$PETSC_DIR/$PETSC_ARCH/bin/mpirun
</pre><p>Download: <a href="https://bitbucket.org/petsc/petsc/get/v3.8.3.tar.gz">https://bitbucket.org/petsc/petsc/get/v3.8.3.tar.gz</a> <br/>
 Installation instructions: <a href="http://www.mcs.anl.gov/petsc/documentation/installation.html">http://www.mcs.anl.gov/petsc/documentation/installation.html</a> <br/>
</p>
<p>2) Install PetIGA: <br/>
</p>
<p>-Clone the PetIGA source code (confirmed to work with the mechanoChemIGA code at commit 5ecf484). <br/>
 -Enter the PetIGA top directory and install using make: <br/>
 </p>
<pre class="fragment">$ git clone https://bitbucket.org/dalcinl/PetIGA.git
$ cd PetIGA
$ git reset --hard 5ecf484
$ make all
$ make test
</pre><p>-Export path to PetIGA directory: <br/>
 </p>
<pre class="fragment">$ export PETIGA_DIR=/path/to/petiga/
</pre><p>Installation instructions: <a href="https://bitbucket.org/dalcinl/petiga/">https://bitbucket.org/dalcinl/petiga/</a> <br/>
</p>
<p>3) Install CMake: <br/>
</p>
<p>Download: <a href="https://cmake.org/download/">https://cmake.org/download/</a> <br/>
</p>
<p>4) Install the Sacado package from Trilinos (version 11.8.1 recommended) <br/>
</p>
<p>-Download and extract or clone the Trilinos source code. <br/>
 -Simple installation of Sacado as follows (from the Trilinos top directory), with the desire /path/to/trilinos/installation/: <br/>
 </p>
<pre class="fragment">$ mkdir build
$ cd build
$ cmake -DTrilinos_ENABLE_Sacado=ON -DTrilinos_ENABLE_Teuchos=OFF -DCMAKE_INSTALL_PREFIX=/path/to/trilinos/installation/ ../
$ make install
</pre><p>-Export path to Trilinos: <br/>
 </p>
<pre class="fragment">$ export TRILINOS_DIR=/path/to/trilinos/installation/
</pre><p>Download: <a href="http://trilinos.csbsju.edu/download/files/trilinos-11.8.1-Source.tar.gz">http://trilinos.csbsju.edu/download/files/trilinos-11.8.1-Source.tar.gz</a> <br/>
</p>
<p>5) Install igakit (required to convert binary output files to .vtk files; also requires numpy and scipy) </p>
<pre class="fragment">$ pip install https://bitbucket.org/dalcinl/igakit/get/default.tar.gz
</pre><p>Download and installation instructions: <a href="https://bitbucket.org/dalcinl/igakit">https://bitbucket.org/dalcinl/igakit</a></p>
<h1><b>Usage</b> </h1>
<p>To run the example initial boundary value problems, navigate to the desired example folder. Create a makefile using cmake: <br/>
 </p>
<pre class="fragment">$ cmake CMakeLists.txt
</pre><p>To compile the code (default is debug mode): <br/>
 </p>
<pre class="fragment">$ make
</pre><p>To switch the compilation to release mode: <br/>
 </p>
<pre class="fragment">$ make release
</pre><p>To switch the compilation to debug mode: <br/>
 </p>
<pre class="fragment">$ make debug
</pre><p>To run the code (replace "nproc" with the number of processors to be use; superlu_dist is used by default if available, gmres is used otherwise): <br/>
 </p>
<pre class="fragment">$ mpirun -np nproc ./main
</pre><p>To use use gmres instead of superlu_dist: <br/>
 </p>
<pre class="fragment">$ mpirun -np nproc ./main -ksp_type gmres -pc_type none
</pre><p>The ouput files created by the code are .dat binary files and a fieldInfo.txt file. These files can be converted to .vtk files and visualized using tools such as VisIt or ParaView using the igakit package (see step 5 of the installation instructions). To do this file conversion, run the initBounValProbs/writeVTKFile.py script from the directory containing the output files. For example, if the .dat and fieldInfo.txt ouput files were located in the initBounValProb/nonGradientMechanics/3D folder, the following commands would create the .vtk files: <br/>
 </p>
<pre class="fragment">$ cd initBounValProb/nonGradientMechanics/3D
$ python ../../writeVTKFiles.py</pre> </div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
